class Solution {
public:

    int MoreThanHalfNum_Solution(vector<int>& numbers) {
        int count = 0;
        int num = 0;
        for (int i = 0; i < numbers.size(); i++)
        {
            if (count == 0)
            {
                count++;
                num = numbers[i];
            }
            else {
                {
                    if (num == numbers[i])
                        count++;
                    else
                        count--;
                }
            }
        }
        return num;
    }
};